home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / maintgeom.z / maintgeom
Text File  |  1998-10-30  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy((((3333TTTTkkkk))))                              TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_MaintainGeometry, Tk_UnmaintainGeometry - maintain geometry of one
  10.      window relative to another
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  14.  
  15.      TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy(_s_l_a_v_e, _m_a_s_t_e_r, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t)
  16.  
  17.      TTTTkkkk____UUUUnnnnmmmmaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy(_s_l_a_v_e, _m_a_s_t_e_r)
  18.  
  19. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  20.      Tk_Window   _s_l_a_v_e    (in)      Window whose geometry is to be controlled.
  21.  
  22.      Tk_Window   _m_a_s_t_e_r   (in)      Window relative to which _s_l_a_v_e's geometry
  23.                                     will be controlled.
  24.  
  25.      int         _x        (in)      Desired x-coordinate of _s_l_a_v_e in _m_a_s_t_e_r,
  26.                                     measured in pixels from the inside of
  27.                                     _m_a_s_t_e_r's left border to the outside of
  28.                                     _s_l_a_v_e's left border.
  29.  
  30.      int         _y        (in)      Desired y-coordinate of _s_l_a_v_e in _m_a_s_t_e_r,
  31.                                     measured in pixels from the inside of
  32.                                     _m_a_s_t_e_r's top border to the outside of
  33.                                     _s_l_a_v_e's top border.
  34.  
  35.      int         _w_i_d_t_h    (in)      Desired width for _s_l_a_v_e, in pixels.
  36.  
  37.      int         _h_e_i_g_h_t   (in)      Desired height for _s_l_a_v_e, in pixels.
  38.  
  39.  
  40. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  41.      TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy and TTTTkkkk____UUUUnnnnmmmmaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy make it easier for geometry
  42.      managers to deal with slaves whose masters are not their parents.  Three
  43.      problems arise if the master for a slave is not its parent:
  44.  
  45.      (a)  The x- and y-position of the slave must be translated from the
  46.           coordinate system of the master to that of the parent before
  47.           positioning the slave.
  48.  
  49.      (b)  If the master window, or any of its ancestors up to the slave's
  50.           parent, is moved, then the slave must be repositioned within its
  51.           parent in order to maintain the correct position relative to the
  52.           master.
  53.  
  54.      (c)  If the master or one of its ancestors is mapped or unmapped, then
  55.           the slave must be mapped or unmapped to correspond.
  56.  
  57.      None of these problems is an issue if the parent and master are the same.
  58.      For example, if the master or one of its ancestors is unmapped, the slave
  59.      is automatically removed by the screen by X.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy((((3333TTTTkkkk))))                              TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy deals with these problems for slaves whose masters
  75.      aren't their parents.  TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy is typically called by a
  76.      window manager once it has decided where a slave should be positioned
  77.      relative to its master.  TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy translates the coordinates
  78.      to the coordinate system of _s_l_a_v_e's parent and then moves and resizes the
  79.      slave appropriately.  Furthermore, it remembers the desired position and
  80.      creates event handlers to monitor the master and all of its ancestors up
  81.      to (but not including) the slave's parent.  If any of these windows is
  82.      moved, mapped, or unmapped, the slave will be adjusted so that it is
  83.      mapped only when the master is mapped and its geometry relative to the
  84.      master remains as specified by _x, _y, _w_i_d_t_h, and _h_e_i_g_h_t.
  85.  
  86.      When a window manager relinquishes control over a window, or if it
  87.      decides that it does not want the window to appear on the screen under
  88.      any conditions, it calls TTTTkkkk____UUUUnnnnmmmmaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy.  TTTTkkkk____UUUUnnnnmmmmaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy
  89.      unmaps the window and cancels any previous calls to TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy
  90.      for the _m_a_s_t_e_r-_s_l_a_v_e pair, so that the slave's geometry and mapped state
  91.      are no longer maintained automatically.  TTTTkkkk____UUUUnnnnmmmmaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy need not
  92.      be called by a geometry manager if the slave, the master, or any of the
  93.      master's ancestors is destroyed:  Tk will call it automatically.
  94.  
  95.      If TTTTkkkk____MMMMaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy is called repeatedly for the same _m_a_s_t_e_r-_s_l_a_v_e
  96.      pair, the information from the most recent call supersedes any older
  97.      information.  If TTTTkkkk____UUUUnnnnmmmmaaaaiiiinnnnttttaaaaiiiinnnnGGGGeeeeoooommmmeeeettttrrrryyyy is called for a _m_a_s_t_e_r-_s_l_a_v_e pair
  98.      that is isn't currently managed, the call has no effect.
  99.  
  100.  
  101. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  102.      geometry manager, map, master, parent, position, slave, unmap
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.